package com.ljx.itbbs.server.article.service;

import com.ljx.itbbs.common.domain.model.LoginUser;
import com.ljx.itbbs.common.domain.vo.resp.PageResp;
import com.ljx.itbbs.server.article.domain.vo.req.*;
import com.ljx.itbbs.server.article.domain.vo.resp.ArticleInfoResp;
import com.ljx.itbbs.server.article.domain.vo.resp.ArticleUpdateInfoResp;

import java.util.List;

public interface ArticleService {

    Long postArticle(Long userId, ArticleSaveReq req);

    PageResp<ArticleInfoResp> getArticleList(LoginUser loginUser, ArticleListReq articleListReq);

    ArticleInfoResp getArticleInfo(ArticleInfoReq req);

    List<ArticleInfoResp> getNewArticleInfo(ArticleNewReq req);

    List<ArticleInfoResp> getHotArticleInfo();

    void increaseViewsNum(Long articleId);

    void increaseCommentNum(Long articleId);

    void likeArticle(Long userId, Long articleId);

    void collectArticle(Long userId, Long articleId);

    void increaseLikeNum(Long articleId);

    void increaseCollectNum(Long objId);

    void updateInfo(Long userId, ArticleUpdateReq req);

    ArticleUpdateInfoResp getArticleUpdateInfo(Long userId, ArticleInfoReq req);

    PageResp<ArticleInfoResp> adminArticleList(ArticleListReq req);

    void adminUpdateStatus(Long articleId, Integer status);

    void reduceLikeNum(Long articleId);

    PageResp<ArticleInfoResp> getArticleCollectList(Long uid, ArticleCollectReq req);

    void deleteCollectArticle(Long userId, Long articleId);


    void deleteArticle(Long userId, Long articleId);

    void updateStatus(Long userId, Long articleId, Integer status);

    void saveArticleDraft(Long uid, ArticleSaveReq req);

    ArticleUpdateInfoResp getArticleDraftInfo(ArticleInfoReq req);

    PageResp<ArticleInfoResp> getArticleDraftList(LoginUser loginUser, ArticleListReq articleListReq);

    void updateDraftInfo(Long userId, ArticleUpdateReq req);

    void deleteDraftArticle(Long userId, Long articleId);


    PageResp<ArticleInfoResp> platerArticleList(LoginUser loginUser, ArticleListReq req);
}
